package com.why.simpleboot.core.server.tomcat.mvc.bean;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: why-simpleboot-framework
 * @description:
 * @author: @why
 * @create: 2021-07-03 18:31
 **/
public class ModelAndView {

    //返回的页面路径
    private String viewPath;

    //返回的页面数据
    private Map<Object, Object> model = new HashMap<>();

    public String getViewPath() {
        return viewPath;
    }

    public void setViewPath(String viewPath) {
        this.viewPath = viewPath;
    }

    public Map<Object, Object> getModel() {
        return model;
    }

    public ModelAndView addData(String dataName, String dataValue) {
        model.put(dataName, dataValue);
        return this;
    }


    public ModelAndView addDatas(Map<?,?>datas){
        model.putAll(datas);
        return this;
    }













}
